{% extends 'tend/common/base.html' %}
{% import "tend/macros/_patination.html" as page_macros %}
{% block title %} 何三笔记 {% endblock %}
{% block keywords %}  {% endblock %}
{% block description %} 何三笔记 {% endblock %}
{% block content %}
<!--面包导航-->
<nav aria-label="breadcrumb">
    <ol class="breadcrumb bg-white border-0 rounded-0 mb-2 py-2 f-15">
        <li class="breadcrumb-item">
            <i class="fa fa-home mr-1"></i><a href="/">首页</a>
        </li>
        <li class="breadcrumb-item">搜索</li>
    </ol>
</nav>
<!--end-->
<!--文章列表-->
<div class="summary-list">
    {% for a in pagelist.items %}
    <div class="article-block">
        <div class="media mb-1 mb-sm-2 p-2 p-lg-3">
            <div class="align-self-center rounded-6 mr-2 mr-lg-3 w-25 modal-open">
                <a href="{{url_for('main.article',name=a.name)}}">
                    <img class="w-100 article-img" src="{{a.thumbnail_img()}}"
                        alt="{{a.title}}" style="width: 250px; height: 150px;">
                </a>
            </div>
            <div class="media-body">
                <div class="meta-container mb-2 f-12">
                    <img class="avatar" src="{{url_for('.static',filename='img/avatar.png')}}" alt="何三">
                    <span>何三</span>
                    <span class="media-date">{{a.publish_time|pretty_date}}</span>
                    <span class="media-tag-list">
                        {% for tag in a.tags.all() %}
                        <a class="media-tag" href="{{url_for('.tag',t=tag.code)}}">{{tag.name}}</a>
                        {% if not loop.last %}
                        <span class="media-tag-i">•</span>
                        {% endif %}
                        {% endfor %}
                    </span>
                </div>
                <h2 class="mt-0 font-weight-bold text-info f-17">
                    <a href="{{url_for('main.article',name=a.name)}}">{{a.title}}</a>
                </h2>
                <p class="d-none d-sm-block mb-2 f-15">
                    {{a.summary|truncate(120,killwords=True,leeway=0) }}
                </p>
                <p class="d-block d-sm-none mb-2 f-15">
                    {{a.summary|truncate(64,killwords=True,leeway=0) }}
                </p>
                <div class="meta-container mb-0 f-12">
                    <a class="cate" href="{{url_for('.category', c=a.category.name)}}" title="查看当前分类下更多文章">
                        <i class="fa fa-book mr-1"></i>{{a.category.title}}</a>
                    <span><i class="fa fa-eye ml-2 mr-1"></i>{{a.vc}}</span>
                    <!-- <a href="/subject/article/TailScale/#comment-block" title="查看文章评论">
                        <i class="fa fa-comments ml-2 mr-1"></i>0</a> -->
                </div>
            </div>
        </div>
    </div>
    {% endfor %}

</div>
<!--文章列表结束-->
<div>
    {{ page_macros.pagination_widget(pagelist, '.search',q=request.values.get('q','')) }}
</div>

{% endblock %}